<?php
/*** IMPORTANT: TO BE USED IN 'THE LOOP' ***/

global $post;

list($thumb_src, $thumb_width, $thumb_height)= wp_get_attachment_image_src($post->ID, 'large');
$image_url= wp_get_attachment_url($post->ID);
$image_title= $post->post_title;

$parent= get_post($post->post_parent);
$parent_title= $parent->post_title;
$parent_url= get_permalink($parent->ID);
$parent_post_type= $parent->post_type;
$parent_post_type_url= get_post_type_archive_link($parent_post_type);
$parent_post_type_title= get_post_type_object($parent_post_type)->labels->name;
?>

<article class="post">

	<div class="content image">	
		<img class="aligncenter" src="<?php echo $thumb_src; ?>" style="max-width:<?php echo $thumb_width;?>px; max-height:<?php echo $thumb_height;?>px;">	
	</div>
	
	<footer>
		<ul>
			<li class="box soft white"><?php echo cl_get_the_published_date();?></li>
			<li>
				<ul class="breadcrumb">
					<li><a href="<?php echo $parent_post_type_url;?>"><?php echo $parent_post_type_title;?></a></li>
					<li><a href="<?php echo $parent_url;?>"><?php echo $parent_title;?></a></li>
					<li><a href="<?php echo $image_url;?>"><?php echo $image_title;?></a></li>
				</ul>
			</li>				
		</ul>		
		<?php cl_template('social'); ?>
	</footer>
	
	<div class="clear"></div>
	
</article>

